package org.edu.dao.impl;

import java.util.List;

import org.edu.dao.SciencyDao;
import org.edu.model.Sciency;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

@Repository
public class SciencyDaoImpl implements SciencyDao {

	@Autowired
	private SessionFactory sessionFactory;
	public SciencyDaoImpl() {
	}

	@Override
	public List<Sciency> sciencies() {
		return sessionFactory.getCurrentSession().createQuery("from Sciency").list();
	}

}
